<#-- 全局变量 --> 
<#global ctx="${(ctp.contextPath)!''}"> 

<!-- 页头  -->
<#macro head title keywords description>
<html>
	<head>
		<title>${title}</title>
		<meta name="keywords" content="${keywords}" />
		<meta name="description" content="${description}" />
		<meta charset="utf-8">
		<meta name="renderer" content="webkit">
	  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	  	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	  	<meta name="apple-mobile-web-app-status-bar-style" content="black"> 
	  	<meta name="apple-mobile-web-app-capable" content="yes">
	  	<meta name="format-detection" content="telephone=no">
	  	<script type="text/javascript">
			var ctx="${ctx}";
		</script>
</#macro>



<!-- 头部横向导航  -->
<#macro naviHeader>
<body class="no-skin">
	<div class="layui-layout layui-layout-admin">
	<div class="layui-header header header-demo">
		<div class="layui-main">
			<a class="logo" href="/">
				springrain
			</a>
			<ul class="layui-nav">
		      	<li class="layui-nav-item  layui-this">
		        	<a href="/doc/">个人中心</a>
		      	</li>
		      	<li class="layui-nav-item">
		        	<a href="${ctx}/logout">退出</a>
		      	</li>
		    	<span class="layui-nav-bar"></span>
			</ul>
		</div>
	</div>
</#macro>


<!-- 左侧菜单  -->
<#macro leftMenu>
	<div class="layui-side layui-bg-black">
		<div class="layui-side-scroll">
	      	<ul class="layui-nav layui-nav-tree" lay-filter="leftMenu" id="menu">
	      		
			</ul>
		</div>
	</div>
</#macro>


<!-- 内容区 -->
<#macro mainContent>
	<div class="layui-tab" lay-allowClose="true">
		<ul class="layui-tab-title site-demo-title" id="tabPage">
			
		</ul>
		<div class="layui-tab-content site-demo-title ht100p" id="tabPageContent" style="top:116px;">
	  	
	  	</div>
  	</div>
</#macro>


<!-- 页脚  -->
<#macro footer>
				
				<div class="layui-footer footer footer-demo">
				<div class="layui-main">
					<p>2016 © <a href="/">www.9iu.org</a> MIT license</p>
				</div>
			</div>
		</div>
	</body>
</html>
</#macro>


<!-- ******************  -->
<!-- ********组合宏******  -->
<!-- 将宏组合到一块，适用于一些通用的场景  -->
<!-- ******************  -->

<!-- 内容页面通用头部,该宏包含一些通用js、css，适合业务页面使用，不适用与登陆注册等非业务页面。  -->
<#macro commonHead title keywords description>
	<@h.head title="${title}" keywords="${keywords}" description="${description}"/>
	<link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all">
	<link rel="stylesheet" href="${ctx}/layui/css/global.css" media="all">
	<link id="layuicss-skinlayercss" rel="stylesheet" href="${ctx}/layui/css/modules/layer/default/layer.css" media="all">
	<link id="layuicss-skincodecss" rel="stylesheet" href="${ctx}/layui/css/modules/code.css" media="all">
	<link rel="stylesheet" href="${ctx}/css/custom/common/common.css" media="all">
	<script src="${ctx}/js/cache/locache.min.js"></script>
	
	<script src="${ctx}/js/jquery/jquery-1.12.4.js"></script>
	<script src="${ctx}/layui/layui.js"></script>
	<script src="${ctx}/js/custom/common/common.js"></script>
</#macro>

<!-- 内容页面通用部分，将头部横向菜单、左侧菜单、内容区组合起来  -->
<#macro commonPage>
	<@h.naviHeader/>
	<@h.leftMenu/>
	<@h.mainContent/>
	<@h.footer/>
</#macro>